import javax.microedition.lcdui.Image;

public class Seta extends Sprite {
	
	public static final int SETA_UM = 0;
	
	public static final int SETA_TRES = 1;
	
	public static final int SETA_CINCO = 2;
	
	public static final int SETA_SETE = 3;
	
	public static final int SETA_NOVE = 4;
	
	private long tempoSeta;
	
	private boolean noTempo;
	
	private boolean naTela;
	
	private boolean acertada;
	
	private int tipo;
	
	public Seta(int tipoSeta, boolean visible, long tempoSeta, Image setaImage, int posX, int posY) {
		super(0, 0, setaImage, Constants.SETA_FRAME_WIDTH, Constants.SETA_FRAME_HEIGHT, new int[]{tipoSeta});

		this.tempoSeta = tempoSeta;
		this.setVisible(visible);
		this.setPosition(posX, posY);
		
		this.noTempo = false;
		this.naTela = true;
		this.acertada = false;
		this.tipo = tipoSeta;
		
		this.defineCollisionRectangle(0, 0, Constants.SETA_FRAME_WIDTH, Constants.SETA_FRAME_HEIGHT);
	}

	public void update() {
		this.setY(this.getY()-4);
		
		if(this.getY() < Constants.posicaoYFinal/*0*//*Constants.SETA_FRAME_HEIGHT*/){
			this.setEstaNaTela(false);
		}
	}

	public long getTempoSeta() {
		return tempoSeta;
	}

	public void setTempoSeta(long tempoSeta) {
		this.tempoSeta = tempoSeta;
	}

	public boolean estaNoTempo() {
		return noTempo;
	}

	public void setEstaNoTempo(boolean showed) {
		this.noTempo = showed;
	}

	public boolean estaNaTela() {
		return naTela;
	}

	public void setEstaNaTela(boolean in) {
		this.naTela = in;
	}

	public boolean estaAcertada() {
		return acertada;
	}

	public void setAcertada(boolean acertada) {
		this.acertada = acertada;
	}

	public int getTipo() {
		return tipo;
	}

	public void setTipo(int tipo) {
		this.tipo = tipo;
	}
}
